﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class YinSi : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
      if (PlayerPrefs.GetInt("yinSi") == 1)
        {
            Accept();
        }
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    void Next()
    {
     
        SceneManager.LoadScene(1);
      
        
    }

    public void Accept()
    {
     
        transform.GetChild(1).gameObject.SetActive(false);
        PlayerPrefs.SetInt("yinSi", 1);
        Invoke("Next", 2);
    }

    public void Refuse()
    {
        AdManager.Quit();
    }
}
